unit fPositionSel;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dxExEdtr, dxTL, dxDBCtrl, dxDBGrid, DB, DBClient, dxCntner, uCommonclass,
  uCommonVar, uCommonFunc, dxDBTLCl, dxGrClms;

type
  TfrmPositionSel = class(TForm)
    ds1: TDataSource;
    cds1: TClientDataSet;
    dxdbgrd1: TdxDBGrid;
    dxdbgrdclmnPositionNum: TdxDBGridColumn;
    dxdbgrdmgclmnAddressNum: TdxDBGridImageColumn;
    dxdbgrdmgclmnBuildingNum: TdxDBGridImageColumn;
    dxdbgrdmgclmnLayerNum: TdxDBGridImageColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure dxdbgrd1DblClick(Sender: TObject);
  private
    { Private declarations }
    gDBSuperMan: TDBSuperMan;
  public
    { Public declarations }
  end;

var
  frmPositionSel: TfrmPositionSel;

implementation

{$R *.dfm}

procedure TfrmPositionSel.FormCreate(Sender: TObject);
begin
  gDBSuperMan := TDBInquireSuperMan.Create;
end;

procedure TfrmPositionSel.FormShow(Sender: TObject);
begin
  GC_SetImageColumnList(dxdbgrdmgclmnAddressNum, flg_AddressNum);
  GC_SetImageColumnList(dxdbgrdmgclmnBuildingNum, flg_BuildingNum);
  GC_SetImageColumnList(dxdbgrdmgclmnLayerNum, flg_LayerNum);

  gDBSuperMan.Table := 'BI_Position';
  gDBSuperMan.DBGrid := dxdbgrd1;
  gDBSuperMan.FieldsPanel := nil;
//  gDBSuperMan.WhereCondition := 'where dat_code=' + QuotedStr(flg_Position);
  gDBSuperMan.PrepareData;
  gDBSuperMan.ExecuteOperate;
end;

procedure TfrmPositionSel.dxdbgrd1DblClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

end.
